package com.neusoft.nepg.gridders.constants;

import java.util.Map;

public class Constants {
    public static Map<String, String> POLLUTION_LEVEL_DESCRIPTION =
            Map.of("一","优",
            "二","良",
            "三","轻度污染",
            "四","中度污染",
            "五","重度污染",
            "六","严重污染");

    public static String SO2_TO_AQI_LEVEL(int so2){
        if(so2 >=0 && so2 <=50) return "一";
        else if(so2 >=51 && so2 <=150) return "二";
        else if(so2 >=151 && so2 <=475) return "三";
        else if(so2 >=476 && so2 <=800) return "四";
        else if(so2 >=801 && so2 <=1600) return "五";
        else if(so2 >=1601) return "六";
        else return "？";
    }

    public static String CO_TO_AQI_LEVEL(int co){
        if(co>=0 && co<=5) return "一";
        else if(co>=6 && co<=10) return "二";
        else if(co>=11 && co<=35) return "三";
        else if(co>=36 && co<=60) return "四";
        else if(co>=61 && co<=90) return "五";
        else if(co>=91 && co<=150) return "六";
        else return "？";
    }

    public static String PM25_TO_AQI_LEVEL(int pm25){
        if(pm25>=0 && pm25<=35) return "一";
        else if(pm25>=36 && pm25<=75) return "二";
        else if(pm25>=76 && pm25<=115) return "三";
        else if(pm25>=116 && pm25<=150) return "四";
        else if(pm25>=151 && pm25<=250) return "五";
        else if(pm25>=251 && pm25<=500) return "六";
        else return "？";
    }

    public static Map<String, Integer> CHARACTER_SWITCH_VALUE =
            Map.of("一", 1,
                    "二", 2,
                    "三", 3,
                    "四", 4,
                    "五", 5,
                    "六", 6);
    public static Map<Integer, String> VALUE_SWITCH_CHARACTER =
            Map.of(1, "一",
                    2, "二",
                    3, "三",
                    4, "四",
                    5, "五",
                    6, "六");
}
